package com.yw.uglygeeker.dao;

import java.util.List;

import org.hibernate.criterion.Restrictions;
import org.springframework.stereotype.Repository;

import com.yw.master.persistence.BaseDaoImpl;
import com.yw.uglygeeker.pojo.SysDict;

@SuppressWarnings("unchecked")
@Repository
public class SysDictDao extends BaseDaoImpl<SysDict>{
	
	
	public List<SysDict> getListByGroup(String group){
		return createCriteria(Restrictions.eq("dgroup", group)).list();
	}
	
	public List<SysDict> getListByGroup2(String group){
		return find("FROM SysDict WHERE dgroup = ?", group);
	}
	
	public List<SysDict> getListByGroup3(String group){
		return findByTemplate("FROM SysDict WHERE dgroup = ?", group);
	}
	
	public SysDict getDict(Long id){
		return get(id);
	}
}
